{extend name='admin@public/content'}

{block name="button"}
{if auth("$classuri/del")}
<button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-sm layui-btn-danger'>删除</button>
{/if}
{/block}

{block name="content"}

<form onsubmit="return false;" data-auto="true" method="post">
    {empty name='list'}
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    {else}
    <input type="hidden" value="resort" name="action">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none="" data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='text-left nowrap'>姓名</th>
            <th class='text-left nowrap'>咨询信息</th>
            <th class='text-left nowrap'>联系方式</th>
            <th class='text-left nowrap'>咨询时间</th>
            <th class='text-left nowrap'>其他信息</th>
            <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
            <tr>
                <td class='list-table-check-td think-checkbox'>
                    <input class="list-check-box" value='{$vo.id}' type='checkbox'>
                </td>
                <td class='text-left nowrap'>
                    {$vo.content.name ?: ''}
                </td>
                <td class='text-left nowrap'>
                    {$vo.content.content ?: ''}
                </td>
                <td class='text-left nowrap'>
                    {$vo.content.phone ?: ''}{$vo.content.tel ?: ''}{$vo.content.link ?: ''}
                </td>
                <td class='text-left nowrap'>
                    {$vo.create_at|format_datetime='Y年m月d日'|str_replace=' ','<br>',###|raw}
                </td>
                <td class='text-left nowrap'>
                    {if $Think.get.type==1}
                    <span class="layui-badge layui-bg-gray">邮箱：{$vo.content.mail}</span><br>
                    {elseif $Think.get.type==2}
                    <span class="layui-badge layui-bg-gray">邮箱：{$vo.content.mail}</span><br>
                    <span class="layui-badge layui-bg-gray">性别：{$vo.content.sex}</span><br>
                    <span class="layui-badge layui-bg-gray">职业：{$vo.content.collect}</span><br>
                    <span class="layui-badge layui-bg-gray">单位：{$vo.content.company}</span><br>
                    {elseif $Think.get.type==3}
                    <span class="layui-badge layui-bg-gray">合作意向：{$vo.content.type}</span><br>
                    <span class="layui-badge layui-bg-gray">单位：{$vo.content.company}</span><br>
                    {elseif $Think.get.type==4}
                    <span class="layui-badge layui-bg-gray">性别：{$vo.content.sex}</span><br>
                    <span class="layui-badge layui-bg-gray">课程类型：{$vo.content.type}</span><br>
                    <span class="layui-badge layui-bg-gray">年龄段：{$vo.content.age}</span><br>
                    <span class="layui-badge layui-bg-gray">学校：{$vo.content.school}</span><br>
                    {/if}
                </td>
                <td class='text-left nowrap'>
                    <!-- Single button -->
                    <div class="btn-group">
                        {if auth("$classuri/del")}
                        <button type="button" class="btn btn-danger" data-update="{$vo.id}" data-action='{:url("$classuri/del")}'>删除</button>
                        {/if}
                    </div>
                </td>
            </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($page)}<p>{$page|raw}</p>{/if}
    {/empty}
</form>
{/block}